package 作业;
import java.util.Scanner;
public class 三角形 {
	@SuppressWarnings("resource")
	public static void main(String[] args) {
        System.out.println("请输入三个数分别代表三角形的三条边");
			Scanner scanner = new Scanner(System.in);		
			int a = scanner.nextInt();
			if (a > 0) {
			    System.out.println("输入正常");
			} else {
			    try {
			        throw new Exception("抛出异常");
			    } catch (Exception e) {
			        System.out.println("输入错误，负值不能做边长");
			    }
			}

			int b = scanner.nextInt();
			if (b > 0) {
			    System.out.println("输入正常");
			} else {
			    try {
			        throw new Exception("抛出异常");
			    } catch (Exception e) {
			        System.out.println("输入错误，负值不能做边长");
			    }
			}

			int c = scanner.nextInt();
			if (c > 0) {
			    System.out.println("输入正常");
			} else {
			    try {
			        throw new Exception("抛出异常");
			    } catch (Exception e) {
			        System.out.println("输入错误，负值不能做边长");
			    }
			}
			if ((a == b) && (b == c)) {
			    System.out.println("等边三角形");
			} else if ((a == b) || (b == c)) {
			    System.out.println("等腰三角形");
			} else if (a * a + b * b == c * c || b * b + c * c == a * a || a * a + c * c == b * b) {
			    System.out.println("直角三角形");
			} else {
			    System.out.println("输入错误：三条边不构成三角形");
			}
		}
    }


